#include<bits/stdc++.h>
using namespace std;
#define int long long
signed main() {
	int a, i;
	cin >> a >> i;
	cout << (i-1)*a + 1;
	return 0;
}
